package org.nnxy.foodboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户浏览历史实体类
 */
@Data
@TableName("user_browse_history")
public class UserBrowseHistory {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    /**
     * 用户ID
     */
    private Integer userId;
    
    /**
     * 食谱ID
     */
    private Integer recipeId;
    
    /**
     * 浏览时间
     */
    private LocalDateTime browseTime;
    
    /**
     * 浏览时长(秒)
     */
    private Integer browseDuration;
    
    /**
     * 逻辑删除标志
     */
    @TableLogic
    @TableField(value = "del_flag")
    private String delFlag;
    
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableField(exist = false)
    private User user;
    
    @TableField(exist = false)
    private Recipe recipe;
} 